import store from '@/store'

export default function getUserInfo(options) {
  const userList = store.state.user.userList
  if (typeof options === 'string') {
    return userList.find(item => item.id === options)
  }
  if (options instanceof Array) {
    const users = []
    options.forEach(option => {
      users.push(userList.find(item => item.id === option))
    })
    return users
  }
}
